\(\int \sqrt {a+b \csc ^2(c+d x)} \, dx\) [11]
Optimal result
Integrand size = 16, antiderivative size = 81 \[
\int \sqrt {a+b \csc ^2(c+d x)} \, dx=-\frac {\sqrt {a} \arctan \left (\frac {\sqrt {a} \cot (c+d x)}{\sqrt {a+b+b \cot ^2(c+d x)}}\right )}{d}-\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \cot (c+d x)}{\sqrt {a+b+b \cot ^2(c+d x)}}\right )}{d}
\]
[Out]
-arctan(cot(d*x+c)*a^(1/2)/(a+b+b*cot(d*x+c)^2)^(1/2))*a^(1/2)/d-arctanh(cot(d*x+c)*b^(1/2)/(a+b+b*cot(d*x+c)^
2)^(1/2))*b^(1/2)/d
Rubi [A] (verified)
Time = 0.07 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.00, number of
steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {4213, 399, 223, 212, 385, 209}
\[
\int \sqrt {a+b \csc ^2(c+d x)} \, dx=-\frac {\sqrt {a} \arctan \left (\frac {\sqrt {a} \cot (c+d x)}{\sqrt {a+b \cot ^2(c+d x)+b}}\right )}{d}-\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \cot (c+d x)}{\sqrt {a+b \cot ^2(c+d x)+b}}\right )}{d}
\]
[In]
Int[Sqrt[a + b*Csc[c + d*x]^2],x]
[Out]
-((Sqrt[a]*ArcTan[(Sqrt[a]*Cot[c + d*x])/Sqrt[a + b + b*Cot[c + d*x]^2]])/d) - (Sqrt[b]*ArcTanh[(Sqrt[b]*Cot[c
+ d*x])/Sqrt[a + b + b*Cot[c + d*x]^2]])/d
Rule 209
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])
Rule 212
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
/; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])
Rule 223
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] && !GtQ[a, 0]
Rule 385
Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]
Rule 399
Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Dist[b/d, Int[(a + b*x^n)^(p - 1), x]
, x] - Dist[(b*c - a*d)/d, Int[(a + b*x^n)^(p - 1)/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c
- a*d, 0] && EqQ[n*(p - 1) + 1, 0] && IntegerQ[n]
Rule 4213
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist
[ff/f, Subst[Int[(a + b + b*ff^2*x^2)^p/(1 + ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p},
x] && NeQ[a + b, 0] && NeQ[p, -1]
Rubi steps \begin{align*}
\text {integral}& = -\frac {\text {Subst}\left (\int \frac {\sqrt {a+b+b x^2}}{1+x^2} \, dx,x,\cot (c+d x)\right )}{d} \\ & = -\frac {a \text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b+b x^2}} \, dx,x,\cot (c+d x)\right )}{d}-\frac {b \text {Subst}\left (\int \frac {1}{\sqrt {a+b+b x^2}} \, dx,x,\cot (c+d x)\right )}{d} \\ & = -\frac {a \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,\frac {\cot (c+d x)}{\sqrt {a+b+b \cot ^2(c+d x)}}\right )}{d}-\frac {b \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {\cot (c+d x)}{\sqrt {a+b+b \cot ^2(c+d x)}}\right )}{d} \\ & = -\frac {\sqrt {a} \arctan \left (\frac {\sqrt {a} \cot (c+d x)}{\sqrt {a+b+b \cot ^2(c+d x)}}\right )}{d}-\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \cot (c+d x)}{\sqrt {a+b+b \cot ^2(c+d x)}}\right )}{d} \\
\end{align*}
Mathematica [A] (verified)
Time = 0.31 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.84
\[
\int \sqrt {a+b \csc ^2(c+d x)} \, dx=\frac {\sqrt {2} \sqrt {a+b \csc ^2(c+d x)} \left (-\sqrt {-b} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {-b} \cos (c+d x)}{\sqrt {-a-2 b+a \cos (2 (c+d x))}}\right )+\sqrt {a} \log \left (\sqrt {2} \sqrt {a} \cos (c+d x)+\sqrt {-a-2 b+a \cos (2 (c+d x))}\right )\right ) \sin (c+d x)}{d \sqrt {-a-2 b+a \cos (2 (c+d x))}}
\]
[In]
Integrate[Sqrt[a + b*Csc[c + d*x]^2],x]
[Out]
(Sqrt[2]*Sqrt[a + b*Csc[c + d*x]^2]*(-(Sqrt[-b]*ArcTanh[(Sqrt[2]*Sqrt[-b]*Cos[c + d*x])/Sqrt[-a - 2*b + a*Cos[
2*(c + d*x)]]]) + Sqrt[a]*Log[Sqrt[2]*Sqrt[a]*Cos[c + d*x] + Sqrt[-a - 2*b + a*Cos[2*(c + d*x)]]])*Sin[c + d*x
])/(d*Sqrt[-a - 2*b + a*Cos[2*(c + d*x)]])
Maple [B] (verified)
Leaf count of result is larger than twice the leaf count of optimal. \(396\) vs. \(2(69)=138\).
Time = 2.39 (sec) , antiderivative size = 397, normalized size of antiderivative = 4.90
| | |
method | result | size |
| | |
default |
\(-\frac {\sin \left (d x +c \right ) \left (b \ln \left (-\frac {4 \left (\sqrt {-\frac {a \cos \left (d x +c \right )^{2}-a -b}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \cos \left (d x +c \right ) \sqrt {b}+\sqrt {b}\, \sqrt {-\frac {a \cos \left (d x +c \right )^{2}-a -b}{\left (\cos \left (d x +c \right )+1\right )^{2}}}-\cos \left (d x +c \right ) a +a +b \right )}{\cos \left (d x +c \right )-1}\right ) \sqrt {-a}+2 a \ln \left (4 \sqrt {-\frac {a \cos \left (d x +c \right )^{2}-a -b}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \cos \left (d x +c \right ) \sqrt {-a}+4 \sqrt {-a}\, \sqrt {-\frac {a \cos \left (d x +c \right )^{2}-a -b}{\left (\cos \left (d x +c \right )+1\right )^{2}}}-4 \cos \left (d x +c \right ) a \right ) \sqrt {b}-\ln \left (\frac {2 \sqrt {-\frac {a \cos \left (d x +c \right )^{2}-a -b}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \cos \left (d x +c \right ) \sqrt {b}+2 \sqrt {b}\, \sqrt {-\frac {a \cos \left (d x +c \right )^{2}-a -b}{\left (\cos \left (d x +c \right )+1\right )^{2}}}+2 \cos \left (d x +c \right ) a +2 a +2 b}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {b}}\right ) \sqrt {-a}\, b \right ) \sqrt {a +b \csc \left (d x +c \right )^{2}}\, \sqrt {4}}{4 d \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {a \cos \left (d x +c \right )^{2}-a -b}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \sqrt {b}\, \sqrt {-a}}\) |
\(397\) |
| | |
|
|
|
[In]
int((a+b*csc(d*x+c)^2)^(1/2),x,method=_RETURNVERBOSE)
[Out]
-1/4/d*sin(d*x+c)*(b*ln(-4*((-(a*cos(d*x+c)^2-a-b)/(cos(d*x+c)+1)^2)^(1/2)*cos(d*x+c)*b^(1/2)+b^(1/2)*(-(a*cos
(d*x+c)^2-a-b)/(cos(d*x+c)+1)^2)^(1/2)-cos(d*x+c)*a+a+b)/(cos(d*x+c)-1))*(-a)^(1/2)+2*a*ln(4*(-(a*cos(d*x+c)^2
-a-b)/(cos(d*x+c)+1)^2)^(1/2)*cos(d*x+c)*(-a)^(1/2)+4*(-a)^(1/2)*(-(a*cos(d*x+c)^2-a-b)/(cos(d*x+c)+1)^2)^(1/2
)-4*cos(d*x+c)*a)*b^(1/2)-ln(2*((-(a*cos(d*x+c)^2-a-b)/(cos(d*x+c)+1)^2)^(1/2)*cos(d*x+c)*b^(1/2)+b^(1/2)*(-(a
*cos(d*x+c)^2-a-b)/(cos(d*x+c)+1)^2)^(1/2)+cos(d*x+c)*a+a+b)/(cos(d*x+c)+1)/b^(1/2))*(-a)^(1/2)*b)*(a+b*csc(d*
x+c)^2)^(1/2)/(cos(d*x+c)+1)/(-(a*cos(d*x+c)^2-a-b)/(cos(d*x+c)+1)^2)^(1/2)*4^(1/2)/b^(1/2)/(-a)^(1/2)
Fricas [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 255 vs. \(2 (69) = 138\).
Time = 0.44 (sec) , antiderivative size = 1341, normalized size of antiderivative = 16.56
\[
\int \sqrt {a+b \csc ^2(c+d x)} \, dx=\text {Too large to display}
\]
[In]
integrate((a+b*csc(d*x+c)^2)^(1/2),x, algorithm="fricas")
[Out]
[1/8*(sqrt(-a)*log(128*a^4*cos(d*x + c)^8 - 256*(a^4 + a^3*b)*cos(d*x + c)^6 + 160*(a^4 + 2*a^3*b + a^2*b^2)*c
os(d*x + c)^4 + a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4 - 32*(a^4 + 3*a^3*b + 3*a^2*b^2 + a*b^3)*cos(d*x + c
)^2 - 8*(16*a^3*cos(d*x + c)^7 - 24*(a^3 + a^2*b)*cos(d*x + c)^5 + 10*(a^3 + 2*a^2*b + a*b^2)*cos(d*x + c)^3 -
(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(d*x + c))*sqrt(-a)*sqrt((a*cos(d*x + c)^2 - a - b)/(cos(d*x + c)^2 - 1))*
sin(d*x + c)) + 2*sqrt(b)*log(2*((a^2 - 6*a*b + b^2)*cos(d*x + c)^4 - 2*(a^2 - 2*a*b - 3*b^2)*cos(d*x + c)^2 +
4*((a - b)*cos(d*x + c)^3 - (a + b)*cos(d*x + c))*sqrt(b)*sqrt((a*cos(d*x + c)^2 - a - b)/(cos(d*x + c)^2 - 1
))*sin(d*x + c) + a^2 + 2*a*b + b^2)/(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1)))/d, -1/8*(4*sqrt(-b)*arctan(-1/2
*((a - b)*cos(d*x + c)^2 - a - b)*sqrt(-b)*sqrt((a*cos(d*x + c)^2 - a - b)/(cos(d*x + c)^2 - 1))*sin(d*x + c)/
(a*b*cos(d*x + c)^3 - (a*b + b^2)*cos(d*x + c))) - sqrt(-a)*log(128*a^4*cos(d*x + c)^8 - 256*(a^4 + a^3*b)*cos
(d*x + c)^6 + 160*(a^4 + 2*a^3*b + a^2*b^2)*cos(d*x + c)^4 + a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4 - 32*(a
^4 + 3*a^3*b + 3*a^2*b^2 + a*b^3)*cos(d*x + c)^2 - 8*(16*a^3*cos(d*x + c)^7 - 24*(a^3 + a^2*b)*cos(d*x + c)^5
+ 10*(a^3 + 2*a^2*b + a*b^2)*cos(d*x + c)^3 - (a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(d*x + c))*sqrt(-a)*sqrt((a*c
os(d*x + c)^2 - a - b)/(cos(d*x + c)^2 - 1))*sin(d*x + c)))/d, 1/4*(sqrt(a)*arctan(1/4*(8*a^2*cos(d*x + c)^4 -
8*(a^2 + a*b)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2)*sqrt(a)*sqrt((a*cos(d*x + c)^2 - a - b)/(cos(d*x + c)^2 - 1
))*sin(d*x + c)/(2*a^3*cos(d*x + c)^5 - 3*(a^3 + a^2*b)*cos(d*x + c)^3 + (a^3 + 2*a^2*b + a*b^2)*cos(d*x + c))
) + sqrt(b)*log(2*((a^2 - 6*a*b + b^2)*cos(d*x + c)^4 - 2*(a^2 - 2*a*b - 3*b^2)*cos(d*x + c)^2 + 4*((a - b)*co
s(d*x + c)^3 - (a + b)*cos(d*x + c))*sqrt(b)*sqrt((a*cos(d*x + c)^2 - a - b)/(cos(d*x + c)^2 - 1))*sin(d*x + c
) + a^2 + 2*a*b + b^2)/(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1)))/d, 1/4*(sqrt(a)*arctan(1/4*(8*a^2*cos(d*x + c
)^4 - 8*(a^2 + a*b)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2)*sqrt(a)*sqrt((a*cos(d*x + c)^2 - a - b)/(cos(d*x + c)^
2 - 1))*sin(d*x + c)/(2*a^3*cos(d*x + c)^5 - 3*(a^3 + a^2*b)*cos(d*x + c)^3 + (a^3 + 2*a^2*b + a*b^2)*cos(d*x
+ c))) - 2*sqrt(-b)*arctan(-1/2*((a - b)*cos(d*x + c)^2 - a - b)*sqrt(-b)*sqrt((a*cos(d*x + c)^2 - a - b)/(cos
(d*x + c)^2 - 1))*sin(d*x + c)/(a*b*cos(d*x + c)^3 - (a*b + b^2)*cos(d*x + c))))/d]
Sympy [F]
\[
\int \sqrt {a+b \csc ^2(c+d x)} \, dx=\int \sqrt {a + b \csc ^{2}{\left (c + d x \right )}}\, dx
\]
[In]
integrate((a+b*csc(d*x+c)**2)**(1/2),x)
[Out]
Integral(sqrt(a + b*csc(c + d*x)**2), x)
Maxima [C] (verification not implemented)
Result contains complex when optimal does not.
Time = 0.87 (sec) , antiderivative size = 3217, normalized size of antiderivative = 39.72
\[
\int \sqrt {a+b \csc ^2(c+d x)} \, dx=\text {Too large to display}
\]
[In]
integrate((a+b*csc(d*x+c)^2)^(1/2),x, algorithm="maxima")
[Out]
-1/2*(2*sqrt(a)*b^(3/2)*arctan2(a*sin(2*d*x + 2*c) + (a^2*cos(4*d*x + 4*c)^2 + a^2*sin(4*d*x + 4*c)^2 + 4*(a^2
+ 4*a*b + 4*b^2)*cos(2*d*x + 2*c)^2 - 4*(a^2 + 2*a*b)*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + 4*(a^2 + 4*a*b + 4*
b^2)*sin(2*d*x + 2*c)^2 + a^2 + 2*(a^2 - 2*(a^2 + 2*a*b)*cos(2*d*x + 2*c))*cos(4*d*x + 4*c) - 4*(a^2 + 2*a*b)*
cos(2*d*x + 2*c))^(1/4)*sqrt(a)*sin(1/2*arctan2(a*sin(4*d*x + 4*c) - 2*(a + 2*b)*sin(2*d*x + 2*c), a*cos(4*d*x
+ 4*c) - 2*(a + 2*b)*cos(2*d*x + 2*c) + a)), a*cos(2*d*x + 2*c) + (a^2*cos(4*d*x + 4*c)^2 + a^2*sin(4*d*x + 4
*c)^2 + 4*(a^2 + 4*a*b + 4*b^2)*cos(2*d*x + 2*c)^2 - 4*(a^2 + 2*a*b)*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + 4*(a^
2 + 4*a*b + 4*b^2)*sin(2*d*x + 2*c)^2 + a^2 + 2*(a^2 - 2*(a^2 + 2*a*b)*cos(2*d*x + 2*c))*cos(4*d*x + 4*c) - 4*
(a^2 + 2*a*b)*cos(2*d*x + 2*c))^(1/4)*sqrt(a)*cos(1/2*arctan2(a*sin(4*d*x + 4*c) - 2*(a + 2*b)*sin(2*d*x + 2*c
), a*cos(4*d*x + 4*c) - 2*(a + 2*b)*cos(2*d*x + 2*c) + a)) - a - 2*b) - a^(3/2)*sqrt(b)*arctan2(2*(a^2*cos(4*d
*x + 4*c)^2 + a^2*sin(4*d*x + 4*c)^2 + 4*(a^2 + 4*a*b + 4*b^2)*cos(2*d*x + 2*c)^2 - 4*(a^2 + 2*a*b)*sin(4*d*x
+ 4*c)*sin(2*d*x + 2*c) + 4*(a^2 + 4*a*b + 4*b^2)*sin(2*d*x + 2*c)^2 + a^2 + 2*(a^2 - 2*(a^2 + 2*a*b)*cos(2*d*
x + 2*c))*cos(4*d*x + 4*c) - 4*(a^2 + 2*a*b)*cos(2*d*x + 2*c))^(1/4)*sqrt(a)*sin(1/2*arctan2(a*sin(4*d*x + 4*c
) - 2*(a + 2*b)*sin(2*d*x + 2*c), a*cos(4*d*x + 4*c) - 2*(a + 2*b)*cos(2*d*x + 2*c) + a)), 2*(a^2*cos(4*d*x +
4*c)^2 + a^2*sin(4*d*x + 4*c)^2 + 4*(a^2 + 4*a*b + 4*b^2)*cos(2*d*x + 2*c)^2 - 4*(a^2 + 2*a*b)*sin(4*d*x + 4*c
)*sin(2*d*x + 2*c) + 4*(a^2 + 4*a*b + 4*b^2)*sin(2*d*x + 2*c)^2 + a^2 + 2*(a^2 - 2*(a^2 + 2*a*b)*cos(2*d*x + 2
*c))*cos(4*d*x + 4*c) - 4*(a^2 + 2*a*b)*cos(2*d*x + 2*c))^(1/4)*sqrt(a)*cos(1/2*arctan2(a*sin(4*d*x + 4*c) - 2
*(a + 2*b)*sin(2*d*x + 2*c), a*cos(4*d*x + 4*c) - 2*(a + 2*b)*cos(2*d*x + 2*c) + a)) - 4*b) + a*b*log(((a + b)
*sqrt((16*b^2*cos(2*d*x + 2*c)^4 + 16*b^2*sin(2*d*x + 2*c)^4 + (a^2 + 2*a*b + b^2)*abs(2*e^(2*I*d*x + 2*I*c) -
2)^4 + 64*b^2*cos(2*d*x + 2*c)^3 + 96*b^2*cos(2*d*x + 2*c)^2 - 8*((a*b + b^2)*cos(2*d*x + 2*c)^2 - (a*b + b^2
)*sin(2*d*x + 2*c)^2 + a*b + b^2 + 2*(a*b + b^2)*cos(2*d*x + 2*c))*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2 + 64*b^2*c
os(2*d*x + 2*c) + 32*(b^2*cos(2*d*x + 2*c)^2 + 2*b^2*cos(2*d*x + 2*c) + b^2)*sin(2*d*x + 2*c)^2 + 16*b^2)/(a^2
+ 2*a*b + b^2))*cos(1/2*arctan2(8*(b*cos(2*d*x + 2*c) + b)*sin(2*d*x + 2*c)/((a + b)*abs(2*e^(2*I*d*x + 2*I*c
) - 2)^2), ((a + b)*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2 - 4*b*cos(2*d*x + 2*c)^2 + 4*b*sin(2*d*x + 2*c)^2 - 8*b*c
os(2*d*x + 2*c) - 4*b)/((a + b)*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2)))^2 + (a + b)*sqrt((16*b^2*cos(2*d*x + 2*c)^
4 + 16*b^2*sin(2*d*x + 2*c)^4 + (a^2 + 2*a*b + b^2)*abs(2*e^(2*I*d*x + 2*I*c) - 2)^4 + 64*b^2*cos(2*d*x + 2*c)
^3 + 96*b^2*cos(2*d*x + 2*c)^2 - 8*((a*b + b^2)*cos(2*d*x + 2*c)^2 - (a*b + b^2)*sin(2*d*x + 2*c)^2 + a*b + b^
2 + 2*(a*b + b^2)*cos(2*d*x + 2*c))*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2 + 64*b^2*cos(2*d*x + 2*c) + 32*(b^2*cos(2
*d*x + 2*c)^2 + 2*b^2*cos(2*d*x + 2*c) + b^2)*sin(2*d*x + 2*c)^2 + 16*b^2)/(a^2 + 2*a*b + b^2))*sin(1/2*arctan
2(8*(b*cos(2*d*x + 2*c) + b)*sin(2*d*x + 2*c)/((a + b)*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2), ((a + b)*abs(2*e^(2*
I*d*x + 2*I*c) - 2)^2 - 4*b*cos(2*d*x + 2*c)^2 + 4*b*sin(2*d*x + 2*c)^2 - 8*b*cos(2*d*x + 2*c) - 4*b)/((a + b)
*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2)))^2 + 4*b*cos(2*d*x + 2*c)^2 + 4*b*sin(2*d*x + 2*c)^2 - 4*sqrt(a*b + b^2)*(
(16*b^2*cos(2*d*x + 2*c)^4 + 16*b^2*sin(2*d*x + 2*c)^4 + (a^2 + 2*a*b + b^2)*abs(2*e^(2*I*d*x + 2*I*c) - 2)^4
+ 64*b^2*cos(2*d*x + 2*c)^3 + 96*b^2*cos(2*d*x + 2*c)^2 - 8*((a*b + b^2)*cos(2*d*x + 2*c)^2 - (a*b + b^2)*sin(
2*d*x + 2*c)^2 + a*b + b^2 + 2*(a*b + b^2)*cos(2*d*x + 2*c))*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2 + 64*b^2*cos(2*d
*x + 2*c) + 32*(b^2*cos(2*d*x + 2*c)^2 + 2*b^2*cos(2*d*x + 2*c) + b^2)*sin(2*d*x + 2*c)^2 + 16*b^2)/(a^2 + 2*a
*b + b^2))^(1/4)*cos(1/2*arctan2(8*(b*cos(2*d*x + 2*c) + b)*sin(2*d*x + 2*c)/((a + b)*abs(2*e^(2*I*d*x + 2*I*c
) - 2)^2), ((a + b)*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2 - 4*b*cos(2*d*x + 2*c)^2 + 4*b*sin(2*d*x + 2*c)^2 - 8*b*c
os(2*d*x + 2*c) - 4*b)/((a + b)*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2)))*sin(2*d*x + 2*c) - 4*(sqrt(a*b + b^2)*cos(
2*d*x + 2*c) + sqrt(a*b + b^2))*((16*b^2*cos(2*d*x + 2*c)^4 + 16*b^2*sin(2*d*x + 2*c)^4 + (a^2 + 2*a*b + b^2)*
abs(2*e^(2*I*d*x + 2*I*c) - 2)^4 + 64*b^2*cos(2*d*x + 2*c)^3 + 96*b^2*cos(2*d*x + 2*c)^2 - 8*((a*b + b^2)*cos(
2*d*x + 2*c)^2 - (a*b + b^2)*sin(2*d*x + 2*c)^2 + a*b + b^2 + 2*(a*b + b^2)*cos(2*d*x + 2*c))*abs(2*e^(2*I*d*x
+ 2*I*c) - 2)^2 + 64*b^2*cos(2*d*x + 2*c) + 32*(b^2*cos(2*d*x + 2*c)^2 + 2*b^2*cos(2*d*x + 2*c) + b^2)*sin(2*
d*x + 2*c)^2 + 16*b^2)/(a^2 + 2*a*b + b^2))^(1/4)*sin(1/2*arctan2(8*(b*cos(2*d*x + 2*c) + b)*sin(2*d*x + 2*c)/
((a + b)*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2), ((a + b)*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2 - 4*b*cos(2*d*x + 2*c)^2
+ 4*b*sin(2*d*x + 2*c)^2 - 8*b*cos(2*d*x + 2*c) - 4*b)/((a + b)*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2))) + 8*b*cos
(2*d*x + 2*c) + 4*b)/((a + b)*abs(2*e^(2*I*d*x + 2*I*c) - 2)^2)) - (a^(3/2) + 2*sqrt(a)*b)*sqrt(b)*arctan2(2*a
*sin(2*d*x + 2*c) + 2*(a^2*cos(4*d*x + 4*c)^2 + a^2*sin(4*d*x + 4*c)^2 + 4*(a^2 + 4*a*b + 4*b^2)*cos(2*d*x + 2
*c)^2 - 4*(a^2 + 2*a*b)*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + 4*(a^2 + 4*a*b + 4*b^2)*sin(2*d*x + 2*c)^2 + a^2 +
2*(a^2 - 2*(a^2 + 2*a*b)*cos(2*d*x + 2*c))*cos(4*d*x + 4*c) - 4*(a^2 + 2*a*b)*cos(2*d*x + 2*c))^(1/4)*sqrt(a)
*sin(1/2*arctan2(a*sin(4*d*x + 4*c) - 2*(a + 2*b)*sin(2*d*x + 2*c), a*cos(4*d*x + 4*c) - 2*(a + 2*b)*cos(2*d*x
+ 2*c) + a)), 2*a*cos(2*d*x + 2*c) + 2*(a^2*cos(4*d*x + 4*c)^2 + a^2*sin(4*d*x + 4*c)^2 + 4*(a^2 + 4*a*b + 4*
b^2)*cos(2*d*x + 2*c)^2 - 4*(a^2 + 2*a*b)*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + 4*(a^2 + 4*a*b + 4*b^2)*sin(2*d*
x + 2*c)^2 + a^2 + 2*(a^2 - 2*(a^2 + 2*a*b)*cos(2*d*x + 2*c))*cos(4*d*x + 4*c) - 4*(a^2 + 2*a*b)*cos(2*d*x + 2
*c))^(1/4)*sqrt(a)*cos(1/2*arctan2(a*sin(4*d*x + 4*c) - 2*(a + 2*b)*sin(2*d*x + 2*c), a*cos(4*d*x + 4*c) - 2*(
a + 2*b)*cos(2*d*x + 2*c) + a)) - 2*a - 4*b))/(a*sqrt(b)*d)
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 1987 vs. \(2 (69) = 138\).
Time = 53.26 (sec) , antiderivative size = 1987, normalized size of antiderivative = 24.53
\[
\int \sqrt {a+b \csc ^2(c+d x)} \, dx=\text {Too large to display}
\]
[In]
integrate((a+b*csc(d*x+c)^2)^(1/2),x, algorithm="giac")
[Out]
-1/10*(sqrt(b)*log(abs(-(sqrt(b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(b*tan(1/2*d*x + 1/2*c)^4 + 4*a*tan(1/2*d*x + 1/
2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c)^2 + b))^5*b - 2*(sqrt(b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(b*tan(1/2*d*x + 1/2*c
)^4 + 4*a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c)^2 + b))^4*a*sqrt(b) - 3*(sqrt(b)*tan(1/2*d*x + 1/2
*c)^2 - sqrt(b*tan(1/2*d*x + 1/2*c)^4 + 4*a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c)^2 + b))^4*b^(3/2
) - 8*(sqrt(b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(b*tan(1/2*d*x + 1/2*c)^4 + 4*a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1
/2*d*x + 1/2*c)^2 + b))^3*a*b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4*a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c)^2 + b))*a*sqrt(b)
- 2*a*b - b^2)) - 6*b^(3/2)*log(abs(-sqrt(b)*tan(1/2*d*x + 1/2*c)^2 + sqrt(b*tan(1/2*d*x + 1/2*c)^4 + 4*a*tan
(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c)^2 + b) - sqrt(b))) - (10*sqrt(-a)*b + b^(3/2))*log(abs(-2*(sqrt
(b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(b*tan(1/2*d*x + 1/2*c)^4 + 4*a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/
2*c)^2 + b))*a^3 + 9*(sqrt(b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(b*tan(1/2*d*x + 1/2*c)^4 + 4*a*tan(1/2*d*x + 1/2*c
)^2 + 2*b*tan(1/2*d*x + 1/2*c)^2 + b))*sqrt(-a)*a^2*sqrt(b) + 16*(sqrt(b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(b*tan(
1/2*d*x + 1/2*c)^4 + 4*a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c)^2 + b))*a^2*b - 14*(sqrt(b)*tan(1/2
*d*x + 1/2*c)^2 - sqrt(b*tan(1/2*d*x + 1/2*c)^4 + 4*a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c)^2 + b)
)*sqrt(-a)*a*b^(3/2) - 6*(sqrt(b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(b*tan(1/2*d*x + 1/2*c)^4 + 4*a*tan(1/2*d*x + 1
/2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c)^2 + b))*a*b^2 + (sqrt(b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(b*tan(1/2*d*x + 1/2*
c)^4 + 4*a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/2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(3/2) + 2*sqrt(-a)*a*b^2 - 4*a*b^(5/2)
- sqrt(-a)*b^3)))/b)*sgn(sin(d*x + c))/d
Mupad [F(-1)]
Timed out. \[
\int \sqrt {a+b \csc ^2(c+d x)} \, dx=\int \sqrt {a+\frac {b}{{\sin \left (c+d\,x\right )}^2}} \,d x
\]
[In]
int((a + b/sin(c + d*x)^2)^(1/2),x)
[Out]
int((a + b/sin(c + d*x)^2)^(1/2), x)